package io.xxx;

public class SumOfTwoIntegers {

    public static void main(String[] args) {
        System.out.println(getSum(1, 3));
        System.out.println("---> " + Integer.toBinaryString(4));
        System.out.println(getSum(2, 3));
        System.out.println("---> " + Integer.toBinaryString(5));
        System.out.println(getSum(11, 22));
        System.out.println("---> " + Integer.toBinaryString(33));
    }

    public static int getSum(int a, int b) {
        String binaryA = Integer.toBinaryString(a);
        String binaryB = Integer.toBinaryString(b);

        System.out.println(binaryA + " ------ " + binaryB);
        System.out.println(a & b);
        System.out.println(a | b);
        System.out.println(a ^ b);
        return a ^ b;
    }
}
